1. Technical Field
The present invention relates to a document processing apparatus and a program.
2. Related Art
In a system of translating a layout-configured document by a computer and outputting a translation of its document, various methods have been used as expression methods of a translation result.
Of their methods, there has been known well a method of substituting a translated character string (translated sentence), at each region of an original document layout, for an original sentence in its region or a method of adding a translated sentence to its region.
In these related arts, on the basis of character volume of the translated sentence and the size of a region within which the translated sentence is confined, the character size is determined, with the result that the translated sentence fits in the region. Accordingly, in case that the character volume of the translated sentence is large, the character size becomes small, with the result that the translated sentence is hard to read.
Therefore, it is thought to widen the region in order to ensure the character size. However, if the region is widened with no condition, a region where the characters are overlapped appears. Further, it is also thought to search a blank portion around an image by analysis of the image and widen the region toward its blank portion. However, if the region is widened with no limit on the basis of only the securement of the character size, there is possibility that the entire layout balance is lost.
An object of the invention is to, in case that a result of a text in each text region in a document is inserted into (confined within) each text region, keep a layout relation between their text regions while avoiding reduction of the character size as much as possible.